﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity.BaseEntitys
{

    public interface IDeleteEntity
    {
        /// <summary>
        /// Whether or not to delete
        /// </summary>
        bool IsDeleted { get; set; }
        /// <summary>
        /// Delete user
        /// </summary>
        Guid? DeleteUserId { get; set; }
        /// <summary>
        /// Delete the time
        /// </summary>
        DateTime? DeleteTime { get; set; }
    }


    [Index(nameof(DeleteTime), nameof(DeleteUserId), nameof(IsDeleted))]
    public class DeleteEntity<T> : UpdateEntity<T> , IDeleteEntity, IUpdateEntity, ICreateEntity, IEntity<T>
    {
        public virtual bool IsDeleted { get ; set; }
        public virtual Guid? DeleteUserId { get; set ; }
        public virtual DateTime? DeleteTime { get; set; }
    }

  
}
